package com.easy.frame.common.process.define.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler;
import com.easy.frame.base.api.pojo.BasePO;
import com.easy.frame.common.process.core.emum.ProcessHandleTypeEnum;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;

import java.util.Set;

/**
 * 流程详情表
 *
 * @author zzf
 * @since 2019-04-11
 */
@Getter
@Setter
@TableName("pub_process_detail")
@ApiModel(value = "PubProcessDetail对象", description = "流程详情表")
public class ProcessDefineDetail extends BasePO {


    @ApiModelProperty(value = "主键ID")
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @ApiModelProperty("流程id")
    private Integer processId;

    @ApiModelProperty("流程条件id")
    private Integer processConditionId;

    @ApiModelProperty("节点序号")
    private Integer orderNum;

    @ApiModelProperty("操作对象")
    private Integer operationTarget;

    @ApiModelProperty("操作对象id集合json字符串")
    @TableField(typeHandler = JacksonTypeHandler.class)
    private Set<Integer> targetIds;

    @ApiModelProperty("通过类型 1：所有人通过才算通过 2：一个人通过就可通过")
    private Integer passType;

    /**
     * @see ProcessHandleTypeEnum
     */
    @ApiModelProperty("操作类型")
    private Integer operationType;

}
